Example: This example shows simple Footer Text being displayed on the document.
import com.cete.dynamicpdf.Document; import com.cete.dynamicpdf.HtmlLayout; import com.cete.dynamicpdf.PageInfo; import com.cete.dynamicpdf.PageOrientation; import com.cete.dynamicpdf.PageSize; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; public class MyClass{ public static void main(String args[]){ //Create Html layout page info PageInfo layoutPage = new PageInfo(PageSize.A4, PageOrientation.PORTRAIT); //Create Uri URI uri = null; try { uri = new URI("html/HtmlTags.html"); } catch (URISyntaxException ex) { } //Create Html Layout HtmlLayout html = new HtmlLayout(uri, layoutPage); //Create a footer html.getFooter().getCenter().setText("%%CP%% of %%TP%%"); html.getFooter().getCenter().setHasPageNumbers(true); //Create a PDF Document Document document = html.layout(); //Save the PDF document.draw("HtmlLayout.pdf"); } }